﻿<UserControl x:Class="TwitterTrendsSilverlightWebPart.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Height="358" Width="218">

    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <ImageBrush Stretch="UniformToFill" ImageSource="Images/slickbg.png"/>
        </Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="20"/>
            <RowDefinition Height="45"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Rectangle Grid.Row="1" x:Name="titleRect" MouseLeftButtonDown="titleRect_MouseLeftButtonDown">
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
                    <GradientStop Color="#FF00A3E1" Offset="0"/>
                    <GradientStop Color="#FF0078A4" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Image HorizontalAlignment="Left" Margin="0,0,0,-35" Grid.RowSpan="2" Width="64" Height="64" VerticalAlignment="Top" Source="Images/twitter_64.png" IsHitTestVisible="False"/>
        <TextBlock Grid.Row="1" TextWrapping="Wrap" Text="Twitter Trends" Foreground="White" FontSize="17.333" Margin="69,8,8,14" d:LayoutOverrides="Height" IsHitTestVisible="False"/>
        <ListBox Grid.Row="2" x:Name="itemsListBox" ItemsSource="{Binding}" ItemTemplate="{StaticResource TweetDataTemplate}" Background="{x:Null}" ItemContainerStyle="{StaticResource TweetContainerSytle}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsPanel="{StaticResource TweetsPanelTemplate}">
            <ListBox.OpacityMask>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Offset="0" Color="Transparent" />
                    <GradientStop Offset="0.05" Color="White" />
                    <GradientStop Offset="0.95" Color="#fff5f5f5" />
                    <GradientStop Offset="1" Color="Transparent" />
                </LinearGradientBrush>
            </ListBox.OpacityMask>
        </ListBox>
    </Grid>
</UserControl>
